package addon.w3.mdx.com;

import java.io.IOException;

import addon.w3.mdx.MDXCOM;
import addon.w3.mdx.LEDataInputStream;
import addon.w3.mdx.MDXException;

/**
 * 	struct {
		float	x,y,z;
	} normals[nnrms];
 * @author madjk
 *
 */
public class MDXNormalCOM extends MDXCOM {
	public float pos[];
	
	public String getTag() {
		return "NRMS:normal";
	}
	
	public void _decode(LEDataInputStream ins) throws IOException, MDXException {
		pos = new float[3];
		pos[0] = ins.readFloat();
		pos[1] = ins.readFloat();
		pos[2] = ins.readFloat();
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("TAG : "+getTag());
		sb.append("\n\tX : "+pos[0]);
		sb.append("\n\tY : "+pos[1]);
		sb.append("\n\tZ : "+pos[2]);
		return sb.toString();
	}

	@Override
	public boolean isImplicitTag() {
		// TODO Auto-generated method stub
		return false;
	}
}
